package com.ly.service.impl;

import com.ly.beans.Users;
import com.ly.dao.UserMapper;
import com.ly.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper mapper;


    @Override
    public List<Users> getlist() {
        return mapper.getlist();
    }

    @Override
    public void dels(int[] ids) {
        mapper.delsp(ids);

        mapper.delusers(ids);
        /*for (String s:split){
            int i = Integer.parseInt(s);
            mapper.dels(i);

        }*/
    }

    @Override
    public void del(Integer id) {
        mapper.dels(id);
        mapper.deluser(id);
    }
}
